<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>无标题文档</title>
		<link href="../css/bgcss.css"
			rel="stylesheet" type="text/css" />
			<script type="text/javascript">
		function isDel(id){
			 if(!confirm('真的要删除吗？')){    
      			 return;    
 		 	 }
 		 	 else{
 		 	 var id=id;
 		 	 	location.href="<%=request.getContextPath()%>/background/product?method=delete&product_Id="+id+"&Action_Id=904";
 		 	 }
		}
	</script>
	</head>

	<body>
		<jsp:include page="../frame/right_top.jsp" flush="true" />
		 <div id="right_font"><img src="<%=request.getContextPath()%>/images/bg/main_14.gif"/> 您现在所在的位置：首页 &gt;&gt; 单品管理 &gt;&gt; 单品基本信息查询 </div>
	<table width="100%" border="0" cellspacing="0" cellpadding="0">
			<tr>
				<td height="30">
				<a
							href="<%=request.getContextPath()%>/background/product?method=updateForward&Action_Id=902" target="mainFrame">添加单品</a>
					<table width="100%" border="0" cellspacing="0" cellpadding="0">
						<tr>
							<td>
								&nbsp;
							</td>
							<td style="padding-right: 10px;">
								<div align="right">
									<table border="0" align="right" cellpadding="0" cellspacing="0">
										<tr>
											<td width="60">
												<table width="87%" border="0" cellpadding="0"
													cellspacing="0">
													<tr>
													</tr>
												</table>
											</td>
											<td width="60">
												<table width="90%" border="0" cellpadding="0"
													cellspacing="0">
													<tr>
													</tr>
												</table>
											</td>
											<td width="60">
												<table width="90%" border="0" cellpadding="0"
													cellspacing="0">
													<tr>
													</tr>
												</table>
											</td>
											<td width="52">
												<table width="88%" border="0" cellpadding="0"
													cellspacing="0">
													<tr>
													</tr>
												</table>
											</td>
										</tr>
									</table>
								</div>
							</td>
						</tr>
					</table>
				</td>
			</tr>
			<tr>
			<td>
			<c:forEach items="${goodPlanList}" var="item" varStatus="var">
			<!-- 正文开始 -->
				<table width="60%" border="0" cellpadding="0" cellspacing="1"
						bgcolor="#c9c9c9">
				<tr>
		      	<th colspan="8" align="center" bgcolor="#FFFFFF">
		      		<h1>${item.dept_Name }</h1>
		      	</th>
		      	</tr>	
						<tr>					
				<td height="22" bgcolor="#FFFFFF">
					<div align="center">
						<strong><span class="STYLE1">序号</span>
						</strong>
					</div>
				</td>
				<td height="22" bgcolor="#FFFFFF">
					<div align="center">
						<strong><span class="STYLE1">名称</span>
						</strong>
					</div>
				</td>
				<td height="22" bgcolor="#FFFFFF">
					<div align="center">
						<strong><span class="STYLE1">单品部门</span>
						</strong>
					</div>
				</td>
				<td height="22" bgcolor="#FFFFFF">
					<div align="center">
						<strong><span class="STYLE1">规格</span>
						</strong>
					</div>
				</td>
				<td height="22" bgcolor="#FFFFFF">
					<div align="center">
						<strong><span class="STYLE1">单位</span>
						</strong>
					</div>
				</td>
				<td height="22" bgcolor="#FFFFFF">
					<div align="center">
						<strong><span class="STYLE1">显示状态</span>
						</strong>
					</div>
				</td>
				<td height="22" bgcolor="#FFFFFF">
					<div align="center">
						<strong><span class="STYLE1">显示顺序</span>
						</strong>
					</div>
				</td>				
				<td height="22" width="200" bgcolor="#FFFFFF">
					<div align="center">
						<strong><span class="STYLE1">备注</span>
						</strong>
					</div>
				</td>						
					<td height="22" width="100" bgcolor="#FFFFFF">
					<div align="center">
						<strong><span class="STYLE1">操作</span>
						</strong>
					</div>								
				
							</td>					
						</tr>
			
				<c:if test="${fn:length(productList)>0}">
					<tr>
						<td colspan="8" align="center">门店根据实际需要手工录入单品名称</td>
					</tr>
				</c:if>
				 <c:forEach items="${item.productList}" var="item" varStatus="var">
							<tr>					
				 <td height="22" bgcolor="#FFFFFF">
				 <div align="center"><span class="STYLE3">${var.count }</span>
					</div>
				</td>
				 <td height="22" bgcolor="#FFFFFF"><div align="center"><span class="STYLE3">${item.product_Name}</span>
						
					</div>
				</td>
				<td height="22" bgcolor="#FFFFFF"><div align="center"><span class="STYLE3">${item.product_Dept_Name}</span>
						
					</div>
				</td>
				<td height="22" bgcolor="#FFFFFF"><div align="center"><span class="STYLE3">${item.product_Specification}</span>
						
					</div>
				</td>
				 <td height="22" bgcolor="#FFFFFF"><div align="center"><span class="STYLE3">${item.product_Unit}</span>
						
					</div>
				</td>
				 <td height="22" bgcolor="#FFFFFF"><div align="center"><span class="STYLE3">${item.product_Status=='1'?'显示':'不显示'}</span>
						
					</div>
				</td>
					<td height="22" bgcolor="#FFFFFF"><div align="center"><span class="STYLE3">${item.product_Sort}</span>
						
					</div>
				</td>
				<td height="22" bgcolor="#FFFFFF"><div align="center"><span class="STYLE3">${item.product_Remark}</span>						
					</div>
				</td>
				
				 <td height="22" bgcolor="#FFFFFF"><div align="center"><span class="STYLE3">
				<input type="button" value="修改" onclick="javascript:location.href='<%=request.getContextPath()%>/background/product?method=updateForward&product_Id=${item.product_Id}&Action_Id=903'"/>
				<input type="button" value="删除" onclick="isDel(${item.product_Id})" />
				</span>
					
					</div>								
				
							</td>							
						</tr>
						</c:forEach>
									
					</table>
					
				<!-- 正文结束 -->	
			</c:forEach>
		</td>
			</tr>
		</table>
	</body>
</html>
